package com.lxmes.pm.service.impl;

import java.util.List;
import com.lxmes.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.lxmes.pm.mapper.AIntellectualInfoMapper;
import com.lxmes.pm.domain.AIntellectualInfo;
import com.lxmes.pm.service.IAIntellectualInfoService;

/**
 * 知识产权信息Service业务层处理
 * 
 * @author zhangzhiyu
 * @date 2023-04-04
 */
@Service
public class AIntellectualInfoServiceImpl implements IAIntellectualInfoService 
{
    @Autowired
    private AIntellectualInfoMapper aIntellectualInfoMapper;

    /**
     * 查询知识产权信息
     * 
     * @param id 知识产权信息主键
     * @return 知识产权信息
     */
    @Override
    public AIntellectualInfo selectAIntellectualInfoById(Long id)
    {
        return aIntellectualInfoMapper.selectAIntellectualInfoById(id);
    }

    /**
     * 查询知识产权信息列表
     * 
     * @param aIntellectualInfo 知识产权信息
     * @return 知识产权信息
     */
    @Override
    public List<AIntellectualInfo> selectAIntellectualInfoList(AIntellectualInfo aIntellectualInfo)
    {
        return aIntellectualInfoMapper.selectAIntellectualInfoList(aIntellectualInfo);
    }

    /**
     * 新增知识产权信息
     * 
     * @param aIntellectualInfo 知识产权信息
     * @return 结果
     */
    @Override
    public int insertAIntellectualInfo(AIntellectualInfo aIntellectualInfo)
    {
        aIntellectualInfo.setCreateTime(DateUtils.getNowDate());
        return aIntellectualInfoMapper.insertAIntellectualInfo(aIntellectualInfo);
    }

    /**
     * 修改知识产权信息
     * 
     * @param aIntellectualInfo 知识产权信息
     * @return 结果
     */
    @Override
    public int updateAIntellectualInfo(AIntellectualInfo aIntellectualInfo)
    {
        aIntellectualInfo.setUpdateTime(DateUtils.getNowDate());
        return aIntellectualInfoMapper.updateAIntellectualInfo(aIntellectualInfo);
    }

    /**
     * 批量删除知识产权信息
     * 
     * @param ids 需要删除的知识产权信息主键
     * @return 结果
     */
    @Override
    public int deleteAIntellectualInfoByIds(Long[] ids)
    {
        return aIntellectualInfoMapper.deleteAIntellectualInfoByIds(ids);
    }

    /**
     * 删除知识产权信息信息
     * 
     * @param id 知识产权信息主键
     * @return 结果
     */
    @Override
    public int deleteAIntellectualInfoById(Long id)
    {
        return aIntellectualInfoMapper.deleteAIntellectualInfoById(id);
    }
}
